/**
 * @filename:CustomBbRoleGroupBindServiceImpl 2022-2-9 17:04:50
 * @project single-maven-project  1.0.0
 * Copyright(c) 2018 yuanz Co. Ltd.
 * All right reserved.
 */
package com.aiks.single.singlemavenproject.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yz.base.boot.entity.AppPage;
import com.aiks.single.singlemavenproject.entity.CustomBbRoleGroupBind;
import com.aiks.single.singlemavenproject.dao.CustomBbRoleGroupBindDao;
import com.aiks.single.singlemavenproject.service.CustomBbRoleGroupBindService;

/**
 * custom_bb_role_group_bind—SERVICEIMPL.
 *
 * @author <a href="mailto:aiks_yuan@163.com">yuanz</a>
 * @date 2022-2-9 17:04:50
 * @since 1.0.0
 **/
@Service
public class CustomBbRoleGroupBindServiceImpl implements CustomBbRoleGroupBindService {

	@Autowired
	public CustomBbRoleGroupBindDao customBbRoleGroupBindDao;

	/**
	 * 查询custom_bb_role_group_bind对象.
	 *
	 * @param id
	 * @return CustomBbRoleGroupBind
	 */
	@Override
	public CustomBbRoleGroupBind selectByPrimaryKey(Long id) {
		return customBbRoleGroupBindDao.selectByPrimaryKey(id);
	}

	/**
	 * 删除custom_bb_role_group_bind对象.
	 *
	 * @param id
	 * @return int
	 */
	@Override
	public int deleteByPrimaryKey(Long id) {
		return customBbRoleGroupBindDao.deleteByPrimaryKey(id);
	}

	/**
	 * 添加custom_bb_role_group_bind对象.
	 *
	 * @param customBbRoleGroupBind
	 * @return int
	 */
	@Override
	public int insertSelective(CustomBbRoleGroupBind customBbRoleGroupBind) {
		return customBbRoleGroupBindDao.insertSelective(customBbRoleGroupBind);
	}

	/**
	 * 修改custom_bb_role_group_bind对象.
	 *
	 * @param customBbRoleGroupBind
	 * @return int
	 */
	@Override
	public int updateByPrimaryKeySelective(CustomBbRoleGroupBind customBbRoleGroupBind) {
		return customBbRoleGroupBindDao.updateByPrimaryKeySelective(customBbRoleGroupBind);
	}

	/**
	 * 查询custom_bb_role_group_bind集合.
	 *
	 * @param customBbRoleGroupBind
	 * @return List<CustomBbRoleGroupBind>
	 */
	@Override
	public List<CustomBbRoleGroupBind> queryCustomBbRoleGroupBindList(CustomBbRoleGroupBind customBbRoleGroupBind) {
		return customBbRoleGroupBindDao.queryCustomBbRoleGroupBindList(customBbRoleGroupBind);
	}

	/**
	 * 分页查询custom_bb_role_group_bind.
	 *
	 * @param page
	 * @return PageInfo<CustomBbRoleGroupBind>
	 */
	@Override
	public PageInfo<CustomBbRoleGroupBind> getCustomBbRoleGroupBindBySearch(AppPage<CustomBbRoleGroupBind> page) {
		// TODO Auto-generated method stub
		PageHelper.startPage(page.getPageNum(), page.getPageSize());
		List<CustomBbRoleGroupBind> list = customBbRoleGroupBindDao.queryCustomBbRoleGroupBindList(page.getParam());
		PageInfo<CustomBbRoleGroupBind> pageInfo = new PageInfo<CustomBbRoleGroupBind>(list);
		return pageInfo;
	}
}
